<%--
  Created by IntelliJ IDEA.
  User: sxjzit001
  Date: 2023/5/6
  Time: 9:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%!
// 申明脚本  申明变量  申明方法
int i = 1;
String title = "产业学院";

    private int initVar=0;
    private int serviceVar=0;
    private int destroyVar=0;
    public void jspInit(){
        initVar++;
        System.out.println("index.jspInit:JSP初始化");
    }
    public void jspDestroy(){
        destroyVar++;
        System.out.println("index.jspDestroy(): JSP被销毁了"+destroyVar+"次");
    }
%>

<%
    // 代码脚本
    System.out.print(i);
    // 通过jsp中的内置对象 request 获取客户端请求的参数
    String name = request.getParameter("name");

    serviceVar++;
    System.out.println("index.JSP响应了"+serviceVar+"次");
    out.print("哈哈哈");
%>

 <div>
     <%=title%>
     <br/>
     接受到客户端传递的参数值是 <%=name%>

<%--   请求转发的使用  --%>
<%--     <jsp:forward page="/login2.jsp"/>--%>
     <%@ include file="/footer.jsp" %>
 </div>
</body>
</html>
